home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
User's Choice Windows CD
/
User's Choice Windows CD (CMS Software)(1993).iso
/
windows5
/
zipit11.zip
/
QSEARCH.TXT
< prev
next >
Wrap
Text File
|
1992-10-25
|
2KB
|
42 lines
Declare Function FindString Lib "QSEARCH.DLL" (ByVal iSwitch As Integer,
ByVal lpPathName As String, ByVal lpSearchString As String, ByVal hWnd As
Integer) As Integer
Declare Function CopyFile Lib "QSEARCH.DLL" (ByVal lpSourcePath As String,
ByVal lpDestPath As String, ByVal bSwitch As Integer) As Integer
Declare Function FindFile Lib "QSEARCH.DLL" (ByVal lpDrive As String,
ByVal lpPattern As String, ByVal hWnd As Integer) As Integer
Sample usage:
List1.SetFocus
h% = GetFocus()
i% = FindString(1, "c:\dos\help.txt", "xcopy", h%)
'searches "c:\dos\help.txt" and puts all lines containing
"xcopy" in listbox with h% 'as hWnd. The first number is a
switch for case sensitivity and line numbers. 0 = 'case
sensitive (-1 with line numbers), 1 = not sensitive (2 with
line numbers) 'It returns the number of lines containing
searchstring or -1 if error opening 'file.
i% = CopyFile("c:\windows\winhelp.exe", "a:\winhelp.exe", 1)
'Copies first argument to second argument. Third argument is a
boolean switch, '0 = copy without file info, 1 = copy with date
and attribute. It returns 0 on 'success or errors outlined in
qsearch.h (at end of qsearch.c).
List1.SetFocus
h% = GetFocus()
i% = FindFile("d", "*.txt", h%)
'Finds files on "d" drive that match the pattern "*.txt" and
places the matches in 'the list box with h% as hWnd. It returns
matches found or -1 if error changing to 'selected drive. Note:
No error checking on floppy drives. If door is open, return
'will be zero.